//
//  ChatManager.h
//  DaJiang
//
//  Created by sally on 16/10/1.
//  Copyright © 2016年 jiniu. All rights reserved.
//

#import "ChatExtDB.h"
#import <Foundation/Foundation.h>

@interface ChatManager : NSObject

// 参照图片size，按基准尺寸等比压缩
+ (CGSize)compressSizeWithImageSize:(CGSize)imageSize;

// 设置APNS全局属性
+ (void)setNotificationOption;

// 设置本地通知，推送环信消息
+ (void)registerLocalNotification:(EMMessage *)message;

// 移除本地通知，在不需要此通知时记得移除
+ (void)removeNotification;

// 统计并设置未读消息数
+ (void)setupUnreadMessageCount:(UINavigationController *)nav;

// 添加聊天扩展数据到数据库（用于存储使用 昵称和头像）
+ (void)addExtDateToDB:(Ext *)ext;

//发环信文本消息
+ (EMMessage *)sendTextMessage:(NSString *)text
                            to:(NSString *)toUser
                   messageType:(EMMessageType)messageType
             requireEncryption:(BOOL)requireEncryption
                    messageExt:(NSDictionary *)messageExt;

//发环信图片消息
+ (EMMessage *)sendImageMessageWithImage:(UIImage *)image
                                      to:(NSString *)to
                             messageType:(EMMessageType)messageType
                       requireEncryption:(BOOL)requireEncryption
                              messageExt:(NSDictionary *)messageExt
                                progress:(id<IEMChatProgressDelegate>)progress;

@end
